<?php
	
	/**
	* 
	*/
	class HelpModel extends Model
	{
		// 获取用户名
		public function get_userid($username){
			// 拼接链接http://passport.fanli.com/api/admin/getUserIdByParams?username=missgyc
			$url_get_userid='http://passport.fanli.com/api/admin/getUserIdByParams?';
			$params['username']=$username;
			$secretKey=C('secret_key');
			$target_url=D('Util')->pack_passport_api($url_get_userid, $params, $secretKey);
			$obj_ori_userid=file_get_contents($target_url);
			$obj_userid = json_decode($obj_ori_userid);
			$userid=$obj_userid->data;
			return $userid;
		}

		// 链接请求

		public function get_url_result($url,$params){
			$target_url=D('Util')->pack_passport_api($url, $params, C('secret_key'));
			$obj_ori=file_get_contents($target_url);
			$obj_detail = json_decode($obj_ori,true);
			return $obj_detail;
		}
	}